const express = require('express');
const router = express.Router();
const { 
  getGenderDistribution, 
  getHeightStats, 
  getWeightStats 
} = require('../controllers/statsController');
const { protect } = require('../middleware/auth');

// 所有路由都需要认证
router.use(protect);

// 获取性别分布统计
router.get('/gender-distribution', getGenderDistribution);

// 获取身高统计
router.get('/height', getHeightStats);

// 获取体重统计
router.get('/weight', getWeightStats);

module.exports = router;
